home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / AIncludes / ScriptEqu.a < prev    next >
Encoding:
Text File  |  1989-10-13  |  30.5 KB  |  1,142 lines  |  [TEXT/MPS ]

  1. ; Version: 2.56
  2. ; Created: Tuesday, September 12, 1989 at 8:06:46 PM
  3. ;
  4. ; File ScriptEqu.a
  5. ;
  6. ; Assembler Interface to the Macintosh Libraries
  7. ; Copyright Apple Computer, Inc. 1986-1989
  8. ; All Rights Reserved
  9. ;
  10. ; -----------------------------------------------------------------------------
  11. ; Script Manager equates file.
  12. ;
  13. ; This file contains all equates for the script environment, shared
  14. ; equates for the script interface systems, equates that are special for
  15. ; the Roman Interface System, and all equates for the script interface
  16. ; system package.
  17. ; -----------------------------------------------------------------------------
  18.  
  19. ; Note that the version number is divided into two bytes: The high byte is
  20. ; bumped when the changes make the next version incompatible with previous
  21. ; versions. If compatibility is maintained, the low byte is bumped. The low
  22. ; byte is maintained privately by the Script Manager, and is shown as 0 here.
  23.  
  24. smgrVers        EQU         $0200                    ; current version number.
  25.  
  26. ; -----------------------------------------------------------------------------
  27. ; Constants for the Script Manager trap call, _ScriptUtil.
  28. ; -----------------------------------------------------------------------------
  29.  
  30. ; Script Interface System numbers.
  31.  
  32. smRoman         EQU         0                        ; Font script is Roman.
  33. smJapanese        EQU         1                        ; Font script is Japanese.
  34. smChinese        EQU         2                        ; Font script is Chinese.
  35. smKorean        EQU         3                        ; Font script is Korean.
  36. smArabic        EQU         4                        ; Font script is Arabic.
  37. smHebrew        EQU         5                        ; Font script is Hebrew.
  38. smGreek         EQU         6                        ; Font script is Greek.
  39. smRussian        EQU         7                        ; Font script is Russian.
  40. smRSymbol        EQU         8                        ; Font script is Right-left symbol.
  41. smDevanagari    EQU         9                        ; Font script is Devanagari.
  42. smGurmukhi        EQU         10                        ; Font script is Gurmukhi.
  43. smGujarati        EQU         11                        ; Font script is Gujarati.
  44. smOriya         EQU         12                        ; Font script is Oriya.
  45. smBengali        EQU         13                        ; Font script is Bengali.
  46. smTamil         EQU         14                        ; Font script is Tamil.
  47. smTelugu        EQU         15                        ; Font script is Telugu.
  48. smKannada        EQU         16                        ; Font script is Kannada.
  49. smMalayalam     EQU         17                        ; Font script is Malayalam.
  50. smSinhalese     EQU         18                        ; Font script is Sinhalese.
  51. smBurmese        EQU         19                        ; Font script is Burmese.
  52. smKhmer         EQU         20                        ; Font script is Khmer.
  53. smThai            EQU         21                        ; Font script is Thai.
  54. smLaotian        EQU         22                        ; Font script is Laotian.
  55. smGeorgian        EQU         23                        ; Font script is Georgian.
  56. smArmenian        EQU         24                        ; Font script is Armenian.
  57. smMaldivian     EQU         25                        ; Font script is Maldivian.
  58. smTibetan        EQU         26                        ; Font script is Tibetan.
  59. smMongolian     EQU         27                        ; Font script is Mongolian.
  60. smAmharic        EQU         28                        ; Font script is Amharic.
  61. smGeez            EQU         28                        ; Font script is Amharic.
  62. smSlavic        EQU         29                        ; Font script is Slavic.
  63. smVietnamese    EQU         30                        ; Font script is Vietnamese.
  64. smSindhi        EQU         31                        ; Font script is Sindhi.
  65. smUninterp        EQU         32                        ; Font script is uninterpreted Symbols.
  66.  
  67. ; Language Codes
  68.  
  69. langEnglish     EQU         0
  70. langFrench        EQU         1
  71. langGerman        EQU         2
  72. langItalian     EQU         3
  73. langDutch        EQU         4
  74. langSwedish     EQU         5
  75. langSpanish     EQU         6
  76. langDanish        EQU         7
  77. langPortugese    EQU         8
  78. langNorwegian    EQU         9
  79. langHebrew        EQU         10
  80. langJapanese    EQU         11
  81. langArabic        EQU         12
  82. langFinnish     EQU         13
  83. langGreek        EQU         14
  84. langIcelandic    EQU         15
  85. langMalta        EQU         16
  86. langTurkish     EQU         17
  87. langYugoslavian   EQU        18
  88. langChinese     EQU         19
  89. langUrdu        EQU         20
  90. langHindi        EQU         21
  91. langThai        EQU         22
  92.  
  93. ; Calendar Codes
  94.  
  95. calGregorian    EQU         0
  96. calArabicCivil    EQU         1
  97. calArabicLunar    EQU         2
  98. calJapanese     EQU         3
  99. calJewish        EQU         4
  100. calCoptic        EQU         5
  101.  
  102. ; Integer Format Codes
  103.  
  104. intWestern        EQU         0
  105. intArabic        EQU         1
  106. intRoman        EQU         2
  107. intJapanese     EQU         3
  108. intEuropean     EQU         4
  109. intOutputMask    EQU         $8000
  110.  
  111. ; CharByte byte types.
  112.  
  113. smSingleByte    EQU         0
  114. smFirstByte     EQU         -1
  115. smLastByte        EQU         1
  116. smMiddleByte    EQU         2
  117.  
  118. ; CharType field masks
  119.  
  120. smcTypeMask     EQU         $000F
  121. smcReserved     EQU         $00F0
  122. smcClassMask    EQU         $0F00
  123. smcReserved12    EQU         $1000
  124. smcRightMask    EQU         $2000
  125. smcUpperMask    EQU         $4000
  126. smcDoubleMask    EQU         $8000
  127.  
  128. ; CharType character types.
  129.  
  130. smCharPunct     EQU         0
  131. smCharAscii     EQU         1
  132. smCharEuro        EQU         7
  133. smCharFISKana    EQU         2                        ; Katakana
  134. smCharFISGana    EQU         3                        ; Hiragana
  135. smCharFISIdeo    EQU         4                        ; Hanzi, Kanji, Hanja
  136. smCharFISGreek    EQU         5                        ; Greek (2-byte)
  137. smCharFISRussian  EQU        6                        ; Russian/Cyrillic (2-byte)
  138. smCharFISHangul   EQU        8                        ; Hangul (**tentative**)
  139.  
  140. ; CharType classes (smCharPunct sub-types).
  141. smPunctNormal    EQU         $0000
  142. smPunctNumber    EQU         $0100
  143. smPunctSymbol    EQU         $0200
  144. smPunctBlank    EQU         $0300                    ; NBSP is PunctNormal
  145.  
  146. ; CharType classes (smCharFISIdeo sub-types).
  147.  
  148. smFISClassLvl1    EQU         $0000                    ; level 1 char
  149. smFISClassLvl2    EQU         $0100                    ; level 2 char
  150. smFISClassUser    EQU         $0200                    ; user char
  151.  
  152. ; CharType directions
  153.  
  154. smCharLeft        EQU         $0000
  155. smCharRight     EQU         $2000
  156.  
  157. ; CharType case modifers.
  158.  
  159. smCharLower     EQU         $0000
  160. smCharUpper     EQU         $4000
  161.  
  162. ; CharType character size modifiers (1 or multiple bytes).
  163.  
  164. smChar1byte     EQU         $0000
  165. smChar2byte     EQU         $8000
  166.  
  167. ; Char2Pixel directions.
  168.  
  169. smLeftCaret     EQU         0                        ; Place caret for left block.
  170. smRightCaret    EQU         -1                        ; Place caret for right block.
  171. smHilite        EQU         1                        ; Direction is TESysJust.
  172.  
  173. ; Transliterate target types for Roman script.
  174.  
  175. smTransAscii    EQU         0                        ; convert to ASCII
  176. smTransNative    EQU         1                        ; convert to native script
  177. smTransCase     EQU         $FE                     ; convert case for all text
  178. smTransSystem    EQU         $FF                     ; convert to system script
  179.  
  180. ; Transliterate target types for FIS
  181.  
  182. smTransAscii1    EQU         2                        ; 1-byte Roman
  183. smTransAscii2    EQU         3                        ; 2-byte Roman
  184. smTransKana1    EQU         4                        ; 1-byte Katakana
  185. smTransKana2    EQU         5                        ; 2-byte Katakana
  186. ; (no 1-byte hiragana)
  187. smTransGana2    EQU         7                        ; 2-byte Hiragana
  188.  
  189. ; Transliterate target modifiers.
  190.  
  191. smTransLower    EQU         $4000
  192. smTransUpper    EQU         $8000
  193.  
  194. ; Transliterate source mask - general.
  195.  
  196. smMaskAll        EQU         $FFFFFFFF                ; Convert all text
  197.  
  198. ; Transliterate source masks for Roman system.
  199.  
  200. smMaskAscii     EQU         1                        ; 2^smTransAscii
  201. smMaskNative    EQU         $00000002                ; 2^smTransNative
  202.  
  203. ; Transliterate source masks for FIS.
  204.  
  205. smMaskAscii1    EQU         $00000004                ; 2^smTransAscii1
  206. smMaskAscii2    EQU         $00000008                ; 2^smTransAscii2
  207. smMaskKana1     EQU         $00000010                ; 2^smTransKana1
  208. smMaskKana2     EQU         $00000020                ; 2^smTransKana2
  209. smMaskGana2     EQU         $00000080                ; 2^smTransGana2
  210.  
  211. ; Result values from GetEnvirons, SetEnvirons, GetScript and SetScript calls.
  212.  
  213. smNotInstalled    EQU         0                        ; routine not available in script
  214. smBadVerb        EQU         -1                        ; Bad verb passed to a routine.
  215. smBadScript     EQU         -2                        ; Bad script code passed to a routine.
  216.  
  217. ; Result values from StyledLineBreak
  218.  
  219. smBreakWord     EQU         0                        ; could break at word boundary
  220. smBreakChar     EQU         1                        ; had to break at char boundary
  221. smBreakOverflow   EQU        2                        ; text too short, width subtracted
  222.  
  223. ; -----------------------------------------------------------------------------
  224. ; GetEnvirons and SetEnvirons verbs.
  225. ; -----------------------------------------------------------------------------
  226.  
  227. smVersion        EQU         0                        ; Environment version number.
  228. smMunged        EQU         2                        ; Globals change count.
  229. smEnabled        EQU         4                        ; Environment enabled flag.
  230. smBidirect        EQU         6                        ; One bidirectional script.
  231. smFontForce     EQU         8                        ; Force font flag.
  232. smIntlForce     EQU         10                        ; Force intl flag.
  233. smForced        EQU         12                        ; forced to system script.
  234. smDefault        EQU         14                        ; defaulted to Roman script.
  235. smPrint         EQU         16                        ; Printer action routine.
  236. smSysScript     EQU         18                        ; System script.
  237. smLastScript    EQU         20                        ; Last keyboard script.
  238. smKeyScript     EQU         22                        ; Keyboard script.
  239. smSysRef        EQU         24                        ; System folder refNum.
  240. smKeyCache        EQU         26                        ; Keyboard table cache pointer.
  241. smKeySwap        EQU         28                        ; Swapping table pointer.
  242. smGenFlags        EQU         30                        ; general flags long
  243. smOverride        EQU         32                        ; script override flags
  244. smCharPortion    EQU         34                        ; Ch vs SpExtra proportion
  245. smLastEVerb     EQU         smCharPortion            ; Last environment verb.
  246.  
  247. ; GetScript and SetScript verbs.
  248. ; Note: verbs private to script systems are negative, while
  249. ; those general across script systems are non-negative
  250.  
  251. smScriptVersion   EQU        0                        ; Script software version.
  252. smScriptMunged    EQU         2                        ; Script entry changed count.
  253. smScriptEnabled   EQU        4                        ; Script enabled flag.
  254. smScriptRight    EQU         6                        ; Right to left flag.
  255. smScriptJust    EQU         8                        ; Justification flag.
  256. smScriptRedraw    EQU         10                        ; Word redraw flag.
  257. smScriptSysFond   EQU        12                        ; Preferred system font.
  258. smScriptAppFond   EQU        14                        ; Preferred Application font.
  259. smScriptBundle    EQU         16                        ; Beginning of dictionary verbs.
  260. smScriptNumber    EQU         16                        ; Script itl0 id, from dictionary.
  261. smScriptDate    EQU         18                        ; Script itl1 id, from dictionary.
  262. smScriptSort    EQU         20                        ; Script itl2 id, from dictionary.
  263. smScriptFlags    EQU         22                        ; flags word
  264. smScriptToken    EQU         24                        ; Script itl3 id, from dictionary.
  265. smScriptRsvd3    EQU         26                        ; reserved.
  266. smScriptLang    EQU         28                        ; Current language for script
  267. smScriptNumDate   EQU        30                        ; Script Number/Date formats
  268. smScriptKeys    EQU         32                        ; Script KEYC id.
  269. smScriptIcon    EQU         34                        ; Script SICN id.
  270. smScriptPrint    EQU         36                        ; Script printer action routine.
  271. smScriptTrap    EQU         38                        ; Trap entry pointer.
  272. smScriptCreator   EQU        40                        ; Script file creator.
  273. smScriptFile    EQU         42                        ; Script file name.
  274. smScriptName    EQU         44                        ; Script name.
  275. smLastSVerb     EQU         smScriptName            ; Last script verb.
  276.  
  277. ; -----------------------------------------------------------------------------
  278. ; Bits in the smScriptFlags word (bits above 7 are non-static)
  279. ; -----------------------------------------------------------------------------
  280.  
  281. smsfIntellCP    EQU         0                        ; script has intellegent cut & paste
  282. smsfSingByte    EQU         1                        ; script has only single bytes
  283. smsfNatCase     EQU         2                        ; native chars have upper & lower case
  284. smsfContext     EQU         3                        ; contextual script (e.g. AIS-based)
  285. smsfNoForceFont   EQU        4                        ; will not force characters
  286. smsfB0Digits    EQU         5                        ; has alternate digits at B0-B9
  287. smsfForms        EQU         13                        ; uses contextual forms for letters
  288. smsfLigatures    EQU         14                        ; uses contextual ligatures
  289. smsfReverse     EQU         15                        ; reverses native text, right-left
  290.  
  291. ; Bits in the smGenFlags long. First byte is set from itlc flags byte
  292. smfShowIcon     EQU         31                        ; show icon even if only one script
  293. smfDualCaret    EQU         30                        ; use dual caret for mixed direction text
  294.  
  295. ; Roman script constants.
  296.  
  297. romanVers        EQU         $0101                    ; version number.
  298. romanSysFond    EQU         $3FFF                    ; system font id number.
  299. romanAppFond    EQU         3                        ; application font id number.
  300. romanFlags        EQU         1<<smsfIntellCP++1<<smsfSingByte++1<<smsfNatCase
  301.                                                         ; roman settings
  302.  
  303. ; Script Manager font equates.
  304.  
  305. smFondStart     EQU         $4000                    ; start from 16K.
  306. smFondEnd        EQU         $C000                    ; past end of range at 48K.
  307.  
  308. ; Macintosh character set extensions
  309.  
  310. diaeresisUprY    EQU         $D9                     ; Ÿ
  311. fraction        EQU         $DA                     ; ⁄
  312. intlCurrency    EQU         $DB                     ; €
  313. leftSingGuillemet EQU        $DC                     ; ‹
  314. rightSingGuillemet EQU        $DD                     ;
  315. fiLigature        EQU         $DE                     ; fi
  316. flLigature        EQU         $DF                     ; fl
  317. dblDagger        EQU         $E0                     ; ‡
  318. centeredDot     EQU         $E1                     ; ·
  319. baseSingQuote    EQU         $E2                     ; ‚
  320. baseDblQuote    EQU         $E3                     ; „
  321. perThousand     EQU         $E4                     ; ‰
  322. circumflexUprA    EQU         $E5                     ; Â
  323. circumflexUprE    EQU         $E6                     ; Ê
  324. acuteUprA        EQU         $E7                     ; Á
  325. diaeresisUprE    EQU         $E8                     ; Ë
  326. graveUprE        EQU         $E9                     ; È
  327. acuteUprI        EQU         $EA                     ; Í
  328. circumflexUprI    EQU         $EB                     ; Î
  329. diaeresisUprI    EQU         $EC                     ; Ï
  330. graveUprI        EQU         $ED                     ; Ì
  331. acuteUprO        EQU         $EE                     ; Ó
  332. circumflexUprO    EQU         $EF                     ; Ô
  333. appleLogo        EQU         $F0                     ; 
  334. graveUprO        EQU         $F1                     ; Ò
  335. acuteUprU        EQU         $F2                     ; Ú
  336. circumflexUprU    EQU         $F3                     ; Û
  337. graveUprU        EQU         $F4                     ; Ù
  338. dotlessLwrI     EQU         $F5                     ; ı
  339. circumflex        EQU         $F6                     ; ˆ
  340. tilde            EQU         $F7                     ; ˜
  341. macron            EQU         $F8                     ; ¯
  342. breve            EQU         $F9                     ; ˘
  343. overDot         EQU         $FA                     ; ˙
  344. ring            EQU         $FB                     ; ˚
  345. cedilla         EQU         $FC                     ; ¸
  346. doubleAcute     EQU         $FD                     ; ˝
  347. ogonek            EQU         $FE                     ; ˛
  348. hachek            EQU         $FF                     ; (not shown)
  349.  
  350. ; -----------------------------------------------------------------------------
  351. ; Bundle declarations
  352. ; -----------------------------------------------------------------------------
  353. ; Record declaration for international configuration resource (type itlc).
  354.  
  355. ItlcRecord        record        0
  356. itlcSystem        ds.w        1                        ; default system script.
  357. itlcReserved    ds.w        1                        ; reserved
  358. itlcFontForce    ds.b        1                        ; default font force flag.
  359. itlcIntlForce    ds.b        1                        ; default intl force flag.
  360. itlcOldKybd     ds.b        1                        ; old keyboard
  361. itlcFlags        ds.b        1                        ; general flags
  362. itlcIconOffset    ds.w        1                        ; script icon offset
  363. itlcIconSide    ds.b        1                        ; icon side (R=0,L=$FF)
  364. itlcIconRsvd    ds.b        1                        ; rsvd for other icon info
  365. itlcReserved2    ds.b        36                        ; for future use
  366. itlcSize        equ         *                        ; size of script itlc.
  367.                 endr
  368.  
  369. ; Record declaration for international bundle resource (type itlb).
  370.  
  371. ItlbRecord        record        0
  372. itlbNumber        ds.w        1                        ; ITL0 id number.
  373. itlbDate        ds.w        1                        ; ITL1 id number.
  374. itlbSort        ds.w        1                        ; ITL2 id number.
  375. itlbFlags        ds.w        1                        ; Script Flags.
  376. itlbToken        ds.w        1                        ; ITL4 id number.
  377. itlbReserved3    ds.w        1                        ; reserved.
  378. itlbLang        ds.w        1                        ; cur language for script
  379. itlbNumRep        ds.b        1                        ; number representation code
  380. itlbDateRep     ds.b        1                        ; date representation code
  381. itlbKeys        ds.w        1                        ; KCHR id number.
  382. itlbIcon        ds.w        1                        ; SICN id number.
  383. itlbSize        equ         *                        ; size of bundle.
  384.                 endr
  385.  
  386. ; itl2 routine vector offsets.
  387.  
  388. initHook        EQU         0
  389. fetchHook        EQU         2
  390. vernierHook     EQU         4
  391. projectHook     EQU         6
  392. rsvdHook        EQU         8
  393. exitHook        EQU         10
  394.  
  395. ; Note that the value of itl2FlagsOffset is equal
  396. ; to the value of rsvdHook. In the old itl2
  397. ; format the value at this location
  398. ; was an unused routine offset. In the new itl2
  399. ; format, the value at this location is a flag
  400. ; ($ffff) indicating the new format.
  401.  
  402. itl2FlagsOffset   EQU        8
  403. itl2VersionOffset EQU        28
  404.  
  405. ; itl2 table offsets
  406.  
  407. typeListOffset    EQU         12
  408. classArrayOffset  EQU        14
  409. upperListOffset   EQU        16
  410. lowerListOffset   EQU        18
  411. upperNoMarkListOffset EQU    20
  412. wordTableOffset   EQU        22
  413. wrapTableOffset   EQU        24
  414. noMarkListOffset  EQU        26
  415.  
  416. ; String data structure for itl2 stack frames.
  417.  
  418. IUStrData        record        0
  419. curChar         ds.w        1                        ; current character.
  420. mapChar         ds.w        1                        ; projected character.
  421. decChar         ds.w        1                        ; decision char for weak equality.
  422. bufChar         ds.b        1                        ; buffer for expansion.
  423. justAfter        ds.b        1                        ; boolean for AE vs ligature-AE.
  424. ignChar         ds.b        1                        ; flag: ignore char.
  425. noFetch         ds.b        1                        ; flag: no fetch of next.
  426. strCnt            ds.w        1                        ; length word.
  427. strPtr            ds.l        1                        ; current ptr to string.
  428.                 endr
  429.  
  430. ; Stack frame for itl2 routines.
  431.  
  432. IUSortFrame     record        {oldA6},decrement
  433. result            ds.w        1
  434. aStrText        ds.l        1
  435. bStrText        ds.l        1
  436. aStrLen         ds.w        1
  437. bStrLen         ds.w        1
  438. return            ds.l        1
  439. oldA6            ds.l        1
  440. aInfo            ds            IUStrData
  441. bInfo            ds            IUStrData
  442. wantMag         ds.b        1                        ; 1-MagStrig 0-MagIdString.
  443. weakEq            ds.b        1                        ; Signals at most weak equality.
  444. msLock            ds.b        1                        ; high byte of master ptr.
  445. weakMag         ds.b        1                        ; -1 weak compare, 1 strong compare.
  446. supStorage        ds.b        18                        ; extra storage.
  447. weakAPtr        ds.l        1                        ; sup. pointer
  448. weakBPtr        ds.l        1                        ; sup. pointer
  449. lkSize            equ         *                        ; frame size.
  450. paramBytes        equ         aStrText-return
  451.                 endr
  452.  
  453. LongDateRec     record        0                        ; zero any fields not used!
  454. era             ds.w        1
  455. year            ds.w        1
  456. month            ds.w        1
  457. day             ds.w        1
  458. hour            ds.w        1
  459. minute            ds.w        1
  460. second            ds.w        1
  461. dayOfWeek        ds.w        1
  462. dayOfYear        ds.w        1
  463. weekOfYear        ds.w        1
  464. pm                ds.w        1
  465. ldReserved        ds.w        3
  466. LongDateRecSize   equ        *
  467.                 endR
  468.  
  469. LongDateTime    record        0                        ; record for comp type
  470. highLong        ds.l        1
  471. lowLong         ds.l        1
  472.                 endR
  473.  
  474. ; date equates constants
  475.  
  476. LongDateField    record        0                        ;DateField: enum type
  477. eraField        ds.b        1
  478. yearField        ds.b        1
  479. monthField        ds.b        1
  480. dayField        ds.b        1
  481. hourField        ds.b        1
  482. minuteField     ds.b        1
  483. secondField     ds.b        1
  484. dayOfWeekField    ds.b        1
  485. dayOfYearField    ds.b        1
  486. weekOfYearField   ds.b        1
  487. pmField         ds.b        1
  488. res1Field        ds.b        1
  489. res2Field        ds.b        1
  490. res3Field        ds.b        1
  491.  
  492. maxDateField    equ         pmField                 ; currently largest used field
  493.  
  494. eraMask         equ         1<<eraField
  495. yearMask        equ         1<<yearField
  496. monthMask        equ         1<<monthField
  497. dayMask         equ         1<<dayField
  498. hourMask        equ         1<<hourField
  499. minuteMask        equ         1<<minuteField
  500. secondMask        equ         1<<secondField
  501. dayOfWeekMask    equ         1<<dayOfWeekField
  502. dayOfYearMask    equ         1<<dayOfYearField
  503. weekOfYearMask    equ         1<<weekOfYearField
  504. pmMask            equ         1<<pmField
  505.  
  506. dateStdMask     equ         eraMask++yearMask++monthMask++dayMask++hourMask++minuteMask++secondMask
  507.                 endR
  508.  
  509. smallDateBit    EQU         31                        ; Restrict valid date/time to range of Time global
  510. togChar12HourBit  EQU        30                        ; If toggling hour by char, accept hours 1..12 only
  511. togCharZCycleBit  EQU        29                        ; Modifier for togChar12HourBit: accept hours 0..11 only
  512. togDelta12HourBit EQU        28                        ; If toggling hour up/down, restrict to 12-hour range (am/pm)
  513. genCdevRangeBit   EQU        27                        ; Restrict date/time to range used by genl CDEV
  514. validDateFields   EQU        -1
  515.  
  516.  
  517. TogglePB        record        0
  518. togFlags:        ds.l        1                        ; longint; {caller normally sets low word to dateStdMask = $7F}
  519. amChars:        ds.l        1                        ; resType; {from intl0, but uppercased}
  520. pmChars:        ds.l        1                        ; ResType; {ditto}
  521. reserved:        ds.l        4                        ; array [0..3] of Longint;
  522.                 endR
  523.  
  524. ToggleResults    record        0
  525. toggleUndefined   ds.b        1
  526. toggleOk        ds.b        1
  527. toggleBadField    ds.b        1
  528. toggleBadDelta    ds.b        1
  529. toggleBadChar    ds.b        1
  530. toggleUnknown    ds.b        1
  531. toggleBadNum    ds.b        1                        ;{can't use char as number}
  532. toggleOutOfRange  EQU        *                        ;{synonym for toggleErr3}
  533. toggleErr3        ds.b        1                        ;{reserved}
  534. toggleErr4        ds.b        1                        ;{reserved}
  535. toggleErr5        ds.b        1                        ;{reserved}
  536.                 endR
  537.  
  538. MachineLocation   record    0
  539. latitude        ds.l        1                        ;fract
  540. longitude        ds.l        1                        ;fract
  541. dlsDelta        ds.b        1                        ;signed byte
  542. gmtDelta        ds.b        3                        ;3 byte signed integer
  543.                 endR
  544.  
  545.  
  546.  
  547. ; String2Date status values
  548.  
  549. fatalDateTime    EQU         $8000                    ; String2Date and String2Time mask to a fatal error
  550. longDateFound    EQU         1                        ; String2Date mask to long date found
  551. leftOverChars    EQU         2                        ; String2Date & Time mask to warn of left over characters
  552. sepNotIntlSep    EQU         4                        ; String2Date & Time mask to warn of non standard separators
  553. fieldOrderNotIntl EQU        8                        ; String2Date & Time mask to warn of non standard field order
  554. extraneousStrings EQU        16                        ; String2Date & Time mask to warn of unparsable strings in text
  555. tooManySeps     EQU         32                        ; String2Date & Time mask to warn of too many separators
  556. sepNotConsistent  EQU        64                        ; String2Date & Time mask to warn of inconsistent separators
  557. tokenErr        EQU         $8100                    ; String2Date & Time mask to say that tokenizer err encountered
  558. cantReadUtilities EQU        $8200
  559. dateTimeNotFound  EQU        $8400                    ; String2Date mask to say that date was not found
  560. dateTimeInvalid   EQU        $8800                    ; Invalid time/date e.g. 13:61PM
  561.  
  562. DateOrders        RECORD        0,INCREMENT
  563. mdy             DS.B        1
  564. dmy             DS.B        1
  565. ymd             DS.B        1
  566. myd             DS.B        1
  567. dym             DS.B        1
  568. ydm             DS.B        1
  569.                 ENDR
  570.  
  571. ;  TokenType values
  572.  
  573. tokenIntl        EQU         4                        ; the itl resource number of the tokenizer
  574. tokenEmpty        EQU         -1
  575. tokenUnknown    EQU         0
  576. tokenWhite        EQU         1
  577. tokenLeftLit    EQU         2
  578. tokenRightLit    EQU         3
  579. tokenAlpha        EQU         4
  580. tokenNumeric    EQU         5
  581. tokenNewLine    EQU         6
  582. tokenLeftComment  EQU        7
  583. tokenRightComment EQU        8
  584. tokenLiteral    EQU         9
  585. tokenEscape     EQU         10
  586. tokenAltNum     EQU         11
  587. tokenRealNum    EQU         12
  588. tokenAltReal    EQU         13
  589. tokenReserve1    EQU         14
  590. tokenReserve2    EQU         15
  591. tokenLeftParen    EQU         16
  592. tokenRightParen   EQU        17
  593. tokenLeftBracket  EQU        18
  594. tokenRightBracket EQU        19
  595. tokenLeftCurly    EQU         20
  596. tokenRightCurly   EQU        21
  597. tokenLeftEnclose  EQU        22
  598. tokenRightEnclose EQU        23
  599. tokenPlus        EQU         24
  600. tokenMinus        EQU         25
  601. tokenAsterisk    EQU         26
  602. tokenDivide     EQU         27
  603. tokenPlusMinus    EQU         28
  604. tokenSlash        EQU         29
  605. tokenBackSlash    EQU         30
  606. tokenLess        EQU         31
  607. tokenGreat        EQU         32
  608. tokenEqual        EQU         33
  609. tokenLessEqual2   EQU        34
  610. tokenLessEqual1   EQU        35
  611. tokenGreatEqual2  EQU        36
  612. tokenGreatEqual1  EQU        37
  613. token2Equal     EQU         38
  614. tokenColonEqual   EQU        39
  615. tokenNotEqual    EQU         40
  616. tokenLessGreat    EQU         41
  617. tokenExclamEqual  EQU        42
  618. tokenExclam     EQU         43
  619. tokenTilda        EQU         44
  620. tokenComma        EQU         45
  621. tokenPeriod     EQU         46
  622. tokenLeft2Quote   EQU        47
  623. tokenRight2Quote  EQU        48
  624. tokenLeft1Quote   EQU        49
  625. tokenRight1Quote  EQU        50
  626. token2Quote     EQU         51
  627. token1Quote     EQU         52
  628. tokenSemicolon    EQU         53
  629. tokenPercent    EQU         54
  630. tokenCarat        EQU         55
  631. tokenUnderline    EQU         56
  632. tokenAmpersand    EQU         57
  633. tokenAtSign     EQU         58
  634. tokenBar        EQU         59
  635. tokenQuestion    EQU         60
  636. tokenPi         EQU         61
  637. tokenRoot        EQU         62
  638. tokenSigma        EQU         63
  639. tokenIntegral    EQU         64
  640. tokenMicro        EQU         65
  641. tokenCapPi        EQU         66
  642. tokenInfinity    EQU         67
  643. tokenColon        EQU         68
  644. tokenHash        EQU         69
  645. tokenDollar     EQU         70
  646. tokenNoBreakSpace EQU        71
  647. tokenFraction    EQU         72
  648. tokenIntlCurrency EQU        73
  649. tokenLeftSingGuillemet EQU    74
  650. toeknRightSingGuillemet EQU   75
  651. tokenPerThousand  EQU        76
  652. tokenNil        EQU         127
  653. delimPad        EQU         -2
  654.  
  655. TokenResults    record        0
  656. tokenOK         ds.b        1
  657. tokenOverflow    ds.b        1
  658. stringOverflow    ds.b        1
  659. badDelim        ds.b        1
  660. badEnding        ds.b        1
  661. crash            ds.b        1
  662.                 endr
  663.  
  664. TokenBlock        RECORD        0,INCR
  665. source            ds.l        1
  666. sourceLength    ds.l        1
  667. tokenList        ds.l        1
  668. tokenLength     ds.l        1
  669. tokenCount        ds.l        1
  670. stringList        ds.l        1
  671. stringLength    ds.l        1
  672. stringCount     ds.l        1
  673. doString        ds.b        1
  674. doAppend        ds.b        1
  675. doAlphanumeric    ds.b        1
  676. doNest            ds.b        1
  677. leftDelims        ds.w        2
  678. rightDelims     ds.w        2
  679. leftComment     ds.l        2
  680. rightComment    ds.l        2
  681. escapeCode        ds.w        1
  682. decimalCode     ds.w        1
  683. itlResource     ds.l        1
  684. reserved        ds.l        8                        ;must be zero!
  685.                 ENDR
  686.  
  687. TokenRec        RECORD        0,INCR
  688. theToken        ds.w        1
  689. position        ds.l        1
  690. length            ds.l        1
  691. stringPosition    ds.l        1
  692. tokenRecSize    equ         *
  693.                 ENDR
  694.  
  695. UntokenTable    Record        0, INCR
  696. len             ds.w        1
  697. lastToken        ds.w        1
  698. index            ds.w        256                     ;index table; last = lastToken
  699. ;list of pascal strings here. index pointers are from front of table
  700.                 Endr
  701.  
  702. ; Trap routine selectors: script manager 1.0
  703.  
  704.  
  705. smFontScript    EQU         0
  706. smIntlScript    EQU         2
  707. smKybdScript    EQU         4
  708. smFont2Script    EQU         6
  709. smGetEnvirons    EQU         8
  710. smSetEnvirons    EQU         10
  711. smGetScript     EQU         12
  712. smSetScript     EQU         14
  713. smHighCall        EQU         smSetScript             ; boundry between script mgr & script systems calls
  714. smCharByte        EQU         16
  715. smCharType        EQU         18
  716. smPixel2Char    EQU         20
  717. smChar2Pixel    EQU         22
  718. smTranslit        EQU         24
  719. smFindWord        EQU         26
  720. smHiliteText    EQU         28
  721. smDrawJust        EQU         30
  722. smMeasureJust    EQU         32
  723. smParseTable    EQU         34
  724.  
  725. ; Full Trap routine selectors: script manager 1.0
  726.  
  727. smSelFontScript   EQU        (1<<31)++($0200<<16)++smFontScript
  728. smSelIntlScript   EQU        (1<<31)++($0200<<16)++smIntlScript
  729. smSelKybdScript   EQU        (1<<31)++($0002<<16)++smKybdScript
  730. smSelFont2Script  EQU        (1<<31)++($0202<<16)++smFont2Script
  731. smSelGetEnvirons  EQU        (1<<31)++($0402<<16)++smGetEnvirons
  732. smSelSetEnvirons  EQU        (1<<31)++($0206<<16)++smSetEnvirons
  733. smSelGetScript    EQU         (1<<31)++($0404<<16)++smGetScript
  734. smSelSetScript    EQU         (1<<31)++($0208<<16)++smSetScript
  735. smSelCharType    EQU         (1<<31)++($0206<<16)++smCharType
  736. smSelCharByte    EQU         (1<<31)++($0206<<16)++smCharByte
  737. smSelPixel2Char   EQU        (1<<31)++($020E<<16)++smPixel2Char
  738. smSelChar2Pixel   EQU        (1<<31)++($020C<<16)++smChar2Pixel
  739. smSelTranslit    EQU         (1<<31)++($020E<<16)++smTranslit
  740. smSelFindWord    EQU         (1<<31)++($0012<<16)++smFindWord
  741. smSelHiliteText   EQU        (1<<31)++($000E<<16)++smHiliteText
  742. smSelDrawJust    EQU         (1<<31)++($0008<<16)++smDrawJust
  743. smSelMeasureJust  EQU        (1<<31)++($000C<<16)++smMeasureJust
  744. smSelParseTable   EQU        (1<<31)++($0204<<16)++smParseTable
  745.  
  746. ; Trap routine macros.
  747.  
  748.                 macro
  749.                 _FontScript
  750.                 move.l        #smSelFontScript,-(sp)
  751.                 _ScriptUtil
  752.                 endm
  753.  
  754.                 macro
  755.                 _IntlScript
  756.                 move.l        #smSelIntlScript,-(sp)
  757.                 _ScriptUtil
  758.                 endm
  759.  
  760.                 macro
  761.                 _KeyScript
  762.                 move.l        #smSelKybdScript,-(sp)
  763.                 _ScriptUtil
  764.                 endm
  765.  
  766.                 macro
  767.                 _Font2Script
  768.                 move.l        #smSelFont2Script,-(sp)
  769.                 _ScriptUtil
  770.                 endm
  771.  
  772.                 macro
  773.                 _GetEnvirons
  774.                 move.l        #smSelGetEnvirons,-(sp)
  775.                 _ScriptUtil
  776.                 endm
  777.  
  778.                 macro
  779.                 _SetEnvirons
  780.                 move.l        #smSelSetEnvirons,-(sp)
  781.                 _ScriptUtil
  782.                 endm
  783.  
  784.                 macro
  785.                 _GetScript
  786.                 move.l        #smSelGetScript,-(sp)
  787.                 _ScriptUtil
  788.                 endm
  789.  
  790.                 macro
  791.                 _SetScript
  792.                 move.l        #smSelSetScript,-(sp)
  793.                 _ScriptUtil
  794.                 endm
  795.  
  796.                 macro
  797.                 _CharByte
  798.                 move.l        #smSelCharByte,-(sp)
  799.                 _ScriptUtil
  800.                 endm
  801.  
  802.                 macro
  803.                 _CharType
  804.                 move.l        #smSelCharType,-(sp)
  805.                 _ScriptUtil
  806.                 endm
  807.  
  808.                 macro
  809.                 _Pixel2Char
  810.                 move.l        #smSelPixel2Char,-(sp)
  811.                 _ScriptUtil
  812.                 endm
  813.  
  814.                 macro
  815.                 _Char2Pixel
  816.                 move.l        #smSelChar2Pixel,-(sp)
  817.                 _ScriptUtil
  818.                 endm
  819.  
  820.                 macro
  821.                 _Transliterate
  822.                 move.l        #smSelTranslit,-(sp)
  823.                 _ScriptUtil
  824.                 endm
  825.  
  826.                 macro
  827.                 _FindWord
  828.                 move.l        #smSelFindWord,-(sp)
  829.                 _ScriptUtil
  830.                 endm
  831.  
  832.                 macro
  833.                 _HiliteText
  834.                 move.l        #smSelHiliteText,-(sp)
  835.                 _ScriptUtil
  836.                 endm
  837.  
  838.                 macro
  839.                 _DrawJust
  840.                 move.l        #smSelDrawJust,-(sp)
  841.                 _ScriptUtil
  842.                 endm
  843.  
  844.                 macro
  845.                 _MeasureJust
  846.                 move.l        #smSelMeasureJust,-(sp)
  847.                 _ScriptUtil
  848.                 endm
  849.  
  850.                 macro
  851.                 _ParseTable
  852.                 move.l        #smSelParseTable,-(sp)
  853.                 _ScriptUtil
  854.                 endm
  855.  
  856. ; -----------------------------------------------------------------------------
  857. ; Macros for the Script Manager trap call: Version 1.1
  858. ; -----------------------------------------------------------------------------
  859.  
  860.                 Macro
  861.                 DefSMgrRoutine &name,&selector,&argSize,&returnSize
  862.                 sm&name:    equ &selector**$FFFF
  863.                 smSel&name: equ (1<<31)++(&returnSize<<24)++(&argSize<<16)++sm&name
  864.                 endm
  865.  
  866. ; general script manager routines
  867.  
  868.                 DefSmgrRoutine StyledLineBreak, -2,28,2
  869.                 DefSmgrRoutine GetFormatOrder, -4,18,0
  870.                 DefSmgrRoutine IntlTokenize, -6,4,2
  871.  
  872.                 DefSmgrRoutine InitDateCache, -8,4,2
  873.                 DefSmgrRoutine String2Date, -10,20,2
  874.                 DefSmgrRoutine String2Time, -12,20,2
  875.  
  876.                 DefSmgrRoutine LongDate2Secs, -14,8,0
  877.                 DefSmgrRoutine LongSecs2Date, -16,8,0
  878.                 DefSmgrRoutine ToggleDate, -18,14,2
  879.  
  880.                 DefSmgrRoutine Str2Format, -20,12,2
  881.                 DefSmgrRoutine Format2Str, -22,16,2
  882.                 DefSmgrRoutine FormatX2Str, -24,16,2
  883.                 DefSmgrRoutine FormatStr2X, -26,16,2
  884.                 DefSmgrRoutine ValidDate, -28,12,2
  885.  
  886. smLowCall        EQU         smValidDate             ; lowest script manager routine
  887.  
  888. ; FormatClass enumeration
  889.  
  890. fPositive        EQU         0
  891. fNegative        EQU         1
  892. fZero            EQU         2
  893.  
  894. ; FormatResultType enumeration
  895.  
  896. fFormatOK        EQU         0
  897. fBestGuess        EQU         1
  898. fOutOfSynch     EQU         2
  899. fSpuriousChars    EQU         3
  900. fMissingDelimiter EQU        4
  901. fExtraDecimal    EQU         5
  902. fMissingLiteral   EQU        6
  903. fExtraExp        EQU         7
  904. fFormatOverflow   EQU        8
  905. fFormStrIsNAN    EQU         9
  906. fBadPartsTable    EQU         10
  907. fExtraPercent    EQU         11
  908. fExtraSeparator   EQU        12
  909. fEmptyFormatString EQU        13
  910.  
  911. WideChar        record        0,increment
  912. a                ds.b        2                        ; PACKED ARRAY[0..1] OF CHAR
  913.                 ORG         a
  914. b                ds.w        1                        ; INTEGER
  915.                 endr
  916.  
  917. WideCharArr     record        0,increment
  918. size            ds.w        1                        ; INTEGER
  919. data            ds.w        10                        ; PACKED ARRAY[0..9] OF WideChar
  920.                 endr
  921.  
  922. fVNumber        EQU         0                        ; first version of NumFormatString
  923.  
  924. NumFormatString   record    0,increment
  925. fLength         ds.b        1                        ; length of format String
  926. fVersion        ds.b        1                        ; version number
  927. data            ds.b        254                     ; private data (see nScriptEqu.priv)
  928.                 endr
  929.  
  930.  
  931. Itl4Rec         record        0,increment
  932. flags            ds.w        1
  933. resourceType    ds.l        1
  934. resourceNum     ds.w        1
  935. version         ds.w        1
  936. resHeader1        ds.l        1
  937. resHeader2        ds.l        1
  938. numTables        ds.w        1                        ; one-based.
  939. mapOffset        ds.l        1                        ; offsets are from record start
  940. strOffset        ds.l        1
  941. fetchOffset     ds.l        1
  942. unTokenOffset    ds.l        1
  943. defPartsOffset    ds.l        1
  944. resOffset6        ds.l        1
  945. resOffset7        ds.l        1
  946. resOffset8        ds.l        1
  947. itl4HeaderSize    equ         *
  948. ; the rest is data pointed to by offsets.
  949.                 endr
  950.  
  951. ;Number format equates
  952.  
  953. tokLeftQuote    EQU         1
  954. tokRightQuote    EQU         2
  955. tokLeadPlacer    EQU         3
  956. tokLeader        EQU         4
  957. tokNonLeader    EQU         5
  958. tokZeroLead     EQU         6
  959. tokPercent        EQU         7
  960. tokPlusSign     EQU         8
  961. tokMinusSign    EQU         9
  962. tokThousands    EQU         10
  963. tokSeparator    EQU         12                        ; 11 is reserved
  964. tokEscape        EQU         13
  965. tokDecPoint     EQU         14
  966. tokEPlus        EQU         15
  967. tokEMinus        EQU         16
  968. tokMaxSymbols    EQU         31
  969.  
  970. NumberParts     record        0,increment
  971. version         ds.w        1                        ; integer
  972. data            ds.w        tokMaxSymbols            ; ARRAY[tokLeftQuote..tokMaxSymbols] OF WideChar
  973. pePlus            ds            WideCharArr             ; 64
  974. peMinus         ds            WideCharArr             ; 86
  975. peMinusPlus     ds            WideCharArr             ; 108
  976. altNumTable     ds            WideCharArr             ; 130
  977. reserved        ds.b        20
  978. numberPartsSize   equ        *
  979. curNumberPartsVersion equ    1
  980.                 endr
  981.  
  982.  
  983. FVector         record        0,increment
  984. start            ds.w        1                        ; INTEGER
  985. length            ds.w        1                        ; INTEGER
  986.                 endr
  987.  
  988. TripleInt        record        0,increment
  989. zzz1            ds            FVector
  990. zzz2            ds            FVector
  991. zzz3            ds            FVector
  992.                 endr
  993.  
  994. ScriptRunStatus   record    0,increment
  995. script            ds.b        1
  996. variant         ds.b        1
  997.                 endr
  998.  
  999. ;------------------------------------------------------------------------------
  1000.  
  1001. ; script-specific routines
  1002.  
  1003.                 DefSmgrRoutine PortionText, 36,8,4
  1004.                 DefSmgrRoutine FindScriptRun, 38,12,2
  1005.                 DefSmgrRoutine VisibleLength, 40,8,4
  1006. sisHighCall     EQU         smVisibleLength         ; highest script routine
  1007.                 DefSmgrRoutine IsSpecialFont, 42,2,2
  1008.                 DefSmgrRoutine RawPrinterValues, 44,22,2
  1009. fisHighCall     EQU         smRawPrinterValues        ; highest FIS script routine
  1010.  
  1011. ;------------------------------------------------------------------------------
  1012. ; Trap routine macros: script manager 2.0
  1013.  
  1014.                 macro
  1015.                 _GetFormatOrder
  1016.                 move.l        #smSelGetFormatOrder,-(sp)
  1017.                 _ScriptUtil
  1018.                 endm
  1019.  
  1020.                 macro
  1021.                 _StyledLineBreak
  1022.                 move.l        #smSelStyledLineBreak,-(sp)
  1023.                 _ScriptUtil
  1024.                 endm
  1025.  
  1026.                 macro
  1027.                 _IntlTokenize
  1028.                 move.l        #smSelIntlTokenize,-(sp)
  1029.                 _ScriptUtil
  1030.                 endm
  1031.  
  1032.                 macro
  1033.                 _InitDateCache
  1034.                 move.l        #smSelInitDateCache,-(sp)
  1035.                 _ScriptUtil
  1036.                 endm
  1037.  
  1038.                 macro
  1039.                 _String2Date
  1040.                 move.l        #smSelString2Date,-(sp)
  1041.                 _ScriptUtil
  1042.                 endm
  1043.  
  1044.                 macro
  1045.                 _String2Time
  1046.                 move.l        #smSelString2Time,-(sp)
  1047.                 _ScriptUtil
  1048.                 endm
  1049.  
  1050.                 macro
  1051.                 _LongSecs2Date
  1052.                 move.l        #smSelLongSecs2Date,-(sp)
  1053.                 _ScriptUtil
  1054.                 endm
  1055.  
  1056.                 macro
  1057.                 _LongDate2Secs
  1058.                 move.l        #smSelLongDate2Secs,-(sp)
  1059.                 _ScriptUtil
  1060.                 endm
  1061.  
  1062.                 macro
  1063.                 _Str2Format
  1064.                 move.l        #smSelStr2Format,-(sp)
  1065.                 _ScriptUtil
  1066.                 endm
  1067.  
  1068.                 macro
  1069.                 _Format2Str
  1070.                 move.l        #smSelFormat2Str,-(sp)
  1071.                 _ScriptUtil
  1072.                 endm
  1073.  
  1074.                 macro
  1075.                 _FormatX2Str
  1076.                 move.l        #smSelFormatX2Str,-(sp)
  1077.                 _ScriptUtil
  1078.                 endm
  1079.  
  1080.                 macro
  1081.                 _FormatStr2X
  1082.                 move.l        #smSelFormatStr2X,-(sp)
  1083.                 _ScriptUtil
  1084.                 endm
  1085.  
  1086.                 macro
  1087.                 _ValidDate
  1088.                 move.l        #smSelValidDate,-(sp)
  1089.                 _ScriptUtil
  1090.                 endm
  1091.  
  1092.                 macro
  1093.                 _ToggleDate
  1094.                 move.l        #smSelToggleDate,-(sp)
  1095.                 _ScriptUtil
  1096.                 endm
  1097.  
  1098.                 macro
  1099.                 _PortionText
  1100.                 move.l        #smSelPortionText,-(sp)
  1101.                 _ScriptUtil
  1102.                 endm
  1103.  
  1104.                 macro
  1105.                 _FindScriptRun
  1106.                 move.l        #smSelFindScriptRun,-(sp)
  1107.                 _ScriptUtil
  1108.                 endm
  1109.  
  1110.                 macro
  1111.                 _ReadLocation
  1112.                 movea.l     (sp)+,A0
  1113.                 move.l        #$000C00E4,D0
  1114.                 _ReadXPRam
  1115.                 endm
  1116.  
  1117.                 macro
  1118.                 _WriteLocation
  1119.                 movea.l     (sp)+,A0
  1120.                 move.l        #$000C00E4,D0
  1121.                 _WriteXPRam
  1122.                 endm
  1123.  
  1124.                 macro
  1125.                 _VisibleLength
  1126.                 move.l        #smSelVisibleLength,-(sp)
  1127.                 _ScriptUtil
  1128.                 endm
  1129.  
  1130.                 macro
  1131.                 _IsSpecialFont
  1132.                 move.l        #smSelIsSpecialFont,-(sp)
  1133.                 _ScriptUtil
  1134.                 endm
  1135.  
  1136.                 macro
  1137.                 _RawPrinterValues
  1138.                 move.l        #smSelRawPrinterValues,-(sp)
  1139.                 _ScriptUtil
  1140.                 endm
  1141.  
  1142.